package com.oracle.controller;


import com.oracle.compents.ApiResponse;
import com.oracle.util.OssUtil;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
public class UploadController {

    @PostMapping("/upload")
    public ApiResponse upload(MultipartFile file){
        String url= OssUtil.uploadFileToOss(file);
        System.out.println("url:" + url);
        return ApiResponse.success(url);
    }
}
